<?php
include "Wechat.php";
$wxuserid=$_POST['wxuserid'];
$studentid=$_POST['studentid'];
$password=$_POST['password'];
//var_dump($_POST);

$wechat=new Wechat($wxuserid);
$wechat->bindUser($studentid,$password);
?>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

<!-- Bootstrap -->
<!-- 新 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css">

<!-- 可选的Bootstrap主题文件（一般不用引入） -->
<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap-theme.min.css">

<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
<script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>

<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="http://cdn.bootcss.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>


</head>
<body>

	<div id="content">	
		<br><br><br><br><br><br><br><br>
		<button id="close" class="btn btn-primary btn-lg col-xs-10 col-xs-offset-1">绑定成功</button>
	</div>
  	<script>

		var readyFunc = function onBridgeReady() {
		    var curid;
		    var curAudioId;
		    var playStatus = 0;
		 
		    
		    // 关闭当前webview窗口 - closeWindow
		    document.querySelector('#close').addEventListener('click', function(e){
		    	WeixinJSBridge.invoke('closeWindow',{
		        },function(res){
		            
		            //alert(res.err_msg);
		 
		       });
		    });    
		    
		}


		if (typeof WeixinJSBridge === "undefined") {
		  document.addEventListener('WeixinJSBridgeReady', readyFunc, false);
		} else {
		  readyFunc();
		}	


	</script> 
</body>
</html>
